<!DOCTYPE html>
<html>
<head>
	<title>E8NET</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <include file="./App/Admin/View/Include/css.html" />
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/compiled/tables.css" type="text/css" media="screen" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

    <include file="./App/Admin/View/Include/navbar.html" />
    <include file="./App/Admin/View/Include/menu.html" />


	<!-- main container -->
    <div class="content">

        <div class="container-fluid">
            <div id="pad-wrapper">

                <!-- orders table -->
                <div class="table-wrapper orders-table section">
                    <div class="row-fluid head">
                        <div class="span12">
                            <h4>班级管理</h4>
                        </div>
                    </div>

                    <div class="row-fluid filter-block">
                        <div class="pull-right">
                            <div class="ui-select" style="margin-top: -2px;">
                                <select onchange="change($(this).val())">
                                    <option value="" /> 所有专业班级
                                    <volist name="professionList" id="profession">
                                        <option <if condition="$pid eq $profession['id']">selected</if> value="{$profession.id}" /> {$profession.name}
                                    </volist>
                                </select>
                            </div>
                            <a href="{:U('Class/add')}" class="btn-flat success new-product">+ 添加班级</a>
                        </div>
                    </div>

                    <div class="row-fluid">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th class="span2">
                                    ID
                                </th>
                                <th class="span3">
                                    <span class="line"></span>
                                    班级名称
                                </th>
                                <th class="span3">
                                    <span class="line"></span>
                                    所属专业
                                </th>
                                <th class="span5">
                                    <span class="line"></span>
                                    班级描述
                                </th>
                                <th class="span2 align-right">
                                    <span class="line"></span>ACTION
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            <!-- row -->
                            <volist name="classList" id="class">
                                <tr>
                                    <td>{$class.id}</td>
                                    <td>{$class.name}</td>
                                    <td>{$class.pname}</td>
                                    <td>{$class.description}</td>
                                    <td class="align-right">
                                        <a href="{:U('Class/edit',array('id'=>$class['id']))}">Edit</a>&nbsp;
                                        <a href="javascript:void(0);" onclick="return delConfirm('__APP__/Class/del/id/{$class.id}','班级删除后将导致学生不可用')">Delete</a>
                                    </td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                    </div>
                </div>
                <!-- end orders table -->

                <div class="row ctrls">
                    <div class="pagination pull-right">
                        <ul>
                            {$page}
                        </ul>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!-- end main container -->

	<include file="./App/Admin/View/Include/js.html" />

    <script>
        function change(id) {
            window.location.href = "__ACTION__/pid/" + id;
        }
    </script>

    <script>
    </script>

</body>
</html>